import {http} from '@/utils/http'
import { AxiosRequestConfig } from 'axios'
import { log } from 'console'
import { get } from 'node_modules/axios/index.d.cts'

export default{
  //获取站点领导信息
  getMainInfo:function(params:AxiosRequestConfig){
    return http.httpGet('http://39.104.21.39:8899/business/client/emp/getInfoByCat/ML',params)
  },

  //获取产品分类
  getProductType:function(params:AxiosRequestConfig){
    return http.httpGet('http://39.104.21.39:8899/business/client/product/catAll',params)
  },
  //获取友情链接
  getFriendLink:function(params:AxiosRequestConfig){
    return http.httpGet('http://39.104.21.39:8899/system/client/sitelink/list',params)
  },
  //获取二维码
  getComCode:function(params:AxiosRequestConfig){
    return http.httpGet('http://39.104.21.39:8899/business/client/emp/getInfoByCat/QR',params)
  },
  //保存全局语言接口
  saveLan:function(params:any){
    return http.httpGet('http://39.104.21.39:8899/business/client/emp/getInfoByCat/ML',params)
  },

  //获取验证码
  getImageCode:function(params:AxiosRequestConfig){
    return http.httpGet('http://39.104.21.39:8899/business/client/kaptcha/image-code/'+params,params)
  },
  //登录
  login:function(params:any){
    return http.httpPost('http://39.104.21.39:8899/business/client/member/login',params)
  },
  //登出
  logout:function(params:AxiosRequestConfig){
    console.log("params: ",params)
    return http.httpGet('http://39.104.21.39:8899/business/client/member/loginout/'+params,params)
  },

  //一键注册
  oneRegister:function(params:any){
    return http.httpPost('http://39.104.21.39:8899/business/client/member/registerAuto',params)
  },
  //忘记密码
  forgetPassword:function(params:any){
    return http.httpPost('http://39.104.21.39:8899/business/client/member/resetPWD',params)
  },
  //发送短信验证码
  sendSMS:function(params:AxiosRequestConfig){
    return http.httpGet('http://39.104.21.39:8899//business/client/shortMessage/send'+params,params)
  },
  //校验手机号
  checkPhone:function(params:AxiosRequestConfig){
    return http.httpGet('http://39.104.21.39:8899/business/client/shortMessage/mobileExist/'+params,params)
  },
  //校验短信验证码是否过期
  checkSMSCode:function(params:AxiosRequestConfig){
    return http.httpGet('http://39.104.21.39:8899/business/client/shortMessage/mobileExist/',params)
  }
}